<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<meta name="format-detection" content="telephone=no" />
	<meta name="renderer" content="webkit">
	<style type="text/css">a{text-decoration:none;}img,video{max-width:100%;display:block;} p{margin:5px 0;line-height:1em;}</style>
	<style type="text/css">
        body{
            margin: 0.9375rem 1.125rem;
        }
        p,p span{white-space:normal;word-break:break-all;}
		#Share {
			display: none;
			width: 100%;
    	    height: 50px;
    	    position: fixed;
    	    bottom: 0;
    	    left: 0;
    	    z-index: 100000;
    	    border-radius: 0!important;
    	    background: url(https://qiniujiexino2opublic.51icare.cn/ueditor/images/sharedown_1.png);
    	    background-size: 100% 100%;
		}
		#DownBtn {
			display: none;
			width: 79px;
			height: 32px;
			float: right;
			margin: 9px 20px;
			background: url(https://qiniujiexino2opublic.51icare.cn/ueditor/images/sharedownbtn_1.png);
			background-size: 100% 100%;
		}
        a.active{background:white;}
		h2,h5{margin:0;padding:0;}
		#Tuilist{margin-top: 30px;}
		.list-ul{
		  width:100%;
		  padding:0;
		}
		.list-ul li.first{
			list-style: none;
            width:100%;
            position:relative;
            background:white;
            margin:0;
            padding:0;
        }
        .list-ul li.first a{
            width:100%;
            height:100%;
            display:block;
        }
        .rightimg{
            width:32.5%;
            height: 4.6875rem;
            float:right;
        }
        .bigimg{
            width:100%;
            height:11.125rem;
            padding-bottom:0.1rem
        }
        .left{
            float:left;
            width: 63%;
            height: 4.6875rem; 
            position:relative;
        }
        .list-ul li.first h5{
            font-weight:normal;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient:vertical;
            -webkit-line-clamp: 2;
            font-size:1rem;
            color:#0b0b0b;
            line-height:1.5rem;
            margin-top: -3px;
         }
		.list-ul li.first h2{
            font-size:1rem;
            color:#0b0b0b;
            line-height:1.375rem;
            font-weight:normal;
            margin-bottom:0.625rem;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient:vertical;
            -webkit-line-clamp:1;
		}
		.iconline{
	        justify-content:space-between;
	        -webkit-justify-content: space-between;
	        display: -webkit-box;
	        display: -webkit-flex;
	        display: flex;
	        -webkit-flex-direction: row;
	        flex-direction: row;
	        color:#5f5f5f;
	        line-height:19px;
	        font-size:0.6875rem;
	        margin-top: 0.1rem
	    }
	    .iconline.timeline{
            font-size:0.8125rem;

	    }
	    .iconline.position{
	          position:absolute;
	          bottom:-4px;
	          width:100%;
	    }
        .icona{
          width:0.6875rem;
          height:0.626rem;
          display:inline-block;
          background:url(b.png);
          background-size:100% 100%;
          margin-right:5px;
        }
        .iconb{
          width:0.78125rem;
          height:0.78125rem;
          display:inline-block;
          background:url(c.png);
          background-size:100% 100%;
          margin-right:5px;
          vertical-align: middle;
          margin-top:-2px;
        }
        .numcheck{
          display:inline-block;
          vertical-align: middle;
          margin-top:-2px;
        }
        .threeimg{
          width:32.5%;
          height:4.6875rem;
          padding-bottom:0.3125rem;
        }
        .first-div{height:100%;border-bottom: 1px solid #e9e9e9;padding: 0.875rem 0;margin-bottom:0px}
        .first-div.active{border-bottom: 0px solid #e9e9e9;}
        .belong{
            width:4.6875rem;
            height:1.875rem;
            background:#EDEDED;
            font-size:0.9375rem;
            color:#323232;
            line-height:1.875rem;
            text-align:center;
            border-radius:3px;
            margin-top:10px;
        }
        .relatetui{
            border-left:3px solid #2D6DEB;
            color:#2D6DEB;
            font-size:1.125rem;
            padding-left: 5px;
            line-height:17px;
            margin-top:32px;
            margin-bottom: 22px;
        }
        #Content{
            text-align: justify;
        }
        .relatetui{
		/*-------------- 
				此页面放在https://qiniujiexino2opublic.51icare.cn/ueditor/geth5.html
				如有改动，请在七牛-融合CDN-刷新预取处提交刷新。（CDN缓存）
		 ----------------*/
	</style>
    <title>资讯详情</title>
</head>
<body id="Body">
    <div style=" overflow:hidden; width:0px; height:0; margin:0 auto; position:absolute; top:-800px;display:none;" id="Img"><img src="https://jxo2o.51icare.cn/template/share/images/logo.png"></div>
    <div id="Content">
    </div>
	<div id="Share">
		<div id="DownBtn"></div>
	</div>
	<div id="Tuilist" style="display:none;">
		<!-- <div class="iconline timeline" style="display:none;" id="TimeLine">
		    <div id="TimeTransfer">05-06</div>
		    <div>
		        <span class="iconb"></span><span class="numcheck" id="Clicknum">0</span>
		    </div>
		</div>
		<div id="Belong" class="belong" style="display:none;">
			
		</div> -->
		<div id="List" style="display:none;">
	        <div class="relatetui" id="zhonbg">重磅推荐</div>
			<ul class="page-infinite-list list-ul" id="UlList">
	        </ul>
		</div>
	</div>
    <div style=" overflow:hidden; width:0px; height:0; margin:0 auto; position:absolute; top:-800px;display:none;" id="Imga"><img src="https://jxo2o.51icare.cn/template/share/images/logo.png"></div>
</body>
<script src="zepto.js"></script>
<script src="event.js"></script>
<script src="touch.js"></script>
<script src="ajax.js"></script>
<script src="app-api.js"></script>
<script src="https://info.51icare.cn/web/cut/dist/js/weixin.js"></script>
<script>
	//获取参数
	function getQueryString(name) {
	    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
	    var r = window.location.search.substr(1).match(reg);
	    if (r != null) {
	        return decodeURI(r[2]);
	    }
	    return null;
	}
	//完整时间转化
	function add0(m){return m<10?'0'+m:m }; 
	function getDateFull(shijianchuo,half) {   
	    var time = new Date(parseInt(shijianchuo));  
	    var y = time.getFullYear();  
	    var m = time.getMonth()+1;  
	    var d = time.getDate();  
	    var h = time.getHours();  
	    var mm = time.getMinutes();  
	    var s = time.getSeconds();  
	    if(half){
            return add0(m)+'-'+add0(d);
	    }else{
	        return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm);  
	    }
	};
	//请求url资讯内容
	var getBody = function() {
		var url = getQueryString('url');
		if(!url) {
			alert('页面地址错误')
			return;
		}
		url = encodeURI(url)
		url = decodeURI(url)
		$.ajax({  
		    type : "GET",
		    url : url,
            async:false,
		    success : function(data){
	            $('#Content').append(data);
		    }
		});
        //边距处理
        setTimeout(function(){
            $("#Tuilist").show();
            var bodymargin=$("#Body").css("margin");
            if(bodymargin=="0px"){
               $("#Tuilist").css("margin","0 1.125rem;");
            } 
        },1000)
	}
	//是否显示下载bar
	var isShowDown = function() {
		var isShow = parseInt(getQueryString('isDown'));
		if(isShow == 1) {
			$('#Share,#DownBtn').show()
		} else {
			$('#Share,#DownBtn').hide()
		}
	}
	//事件点击下载
    var ua = navigator.userAgent.toLowerCase();
    $("#DownBtn").on("click", function(){ 
    	if(/iphone|ipad|ipod/.test(ua)){
    	    //window.location.href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1106225692&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8";
            window.location.href="https://itunes.apple.com/cn/app/%E8%87%BBe%E7%9B%BE/id1106225692?mt=8&uo=4"
    	}else{
            window.location.href="http://121.40.216.11:8080/JX_ZhenEDun.apk";
    	}
    }); 
    //屏幕宽度
    document.addEventListener('DOMContentLoaded', function () {
        var deviceWidth = document.documentElement.clientWidth;
        document.documentElement.style.fontSize = deviceWidth / 23.4 + 'px';
    }, false);
    window.onresize = function(){
        var deviceWidth = document.documentElement.clientWidth;
        document.documentElement.style.fontSize = deviceWidth / 23.4 + 'px';
    };
    //推荐内容 
    if(getQueryString("id")){
    	    $.ajax({             
    	        type: 'post',
    	        cache: false,
    	        data:{
    	            id:getQueryString("id")
    	        },
    	        url:"/api/group/app/info/viewInfo.do",
    	        success: function(data){
                    var tuilist;var list='';
                    if(data.result){
    	               tuilist=data.result.infos;
                    }
                    if(data.code==0){
                        share(data.result);
                        $("#Img img,#Imga img").attr("src",data.result.imgUrl.split(",")[0])
                        if(tuilist&&tuilist.length>0){
                            $("#List").show();
            			    $("#TimeTransfer").html(getDateFull(data.result.modifyDate));
            			    $("#Clicknum").html(data.result.clickRate-1);
            			    $("#Belong").html(data.result.labelName);
            	            for(var i=0;i<tuilist.length;i++){
            	                tuilist[i].modify=getDateFull(tuilist[i].modifyDate,true);
            	            	if(list==''){
            	                   list="<li class='first'>";
                                   list+="<a href='#' id="+tuilist[i].id+" typename="+tuilist[i].typeName+" sharetitle="+tuilist[i].title+" imgurl="+tuilist[i].imgUrl+" contenturl="+encodeURI(tuilist[i].contentUrl)+">";
            	            	}else{
            	                   list+="<li class='first'>";
                                   list+="<a href='#' id="+tuilist[i].id+" typename="+tuilist[i].typeName+" sharetitle="+tuilist[i].title+" imgurl="+tuilist[i].imgUrl+" contenturl="+encodeURI(tuilist[i].contentUrl)+">";
            	            	}
            	                if(tuilist[i].styleName=="E"){
            	                    list+="<div class='first-div "+(i==tuilist.length-1?'active':'as')+"'>";
            	                       list+='<div class="left">';
            	                           list+='<h5>'+tuilist[i].title+'</h5>';
            	                           list+='<div class="iconline position">';
            	                               list+='<div style="width:41%;"><span class="icona"></span>'+tuilist[i].labelName+'</div>';
            	                               list+='<div style="width:29%;text-align:left;"><span class="iconb"></span><span class="numcheck">'+tuilist[i].clickRate+'</span></div>';
            	                               list+='<div>'+tuilist[i].modify+'</div>';
            	                           list+='</div>';    
            	                        list+='</div>';
            	                        list+='<img class="rightimg" src="'+tuilist[i].imgUrl+'">';
            	                        list+='<div style="clear:both;"></div>';
            	                    list+='</div>';
                                    list+="</a>";
            	                    list+='</li>';
            	                }else if(tuilist[i].styleName=="O"){
            	                    list+="<div class='first-div "+(i==tuilist.length-1?'active':'as')+"'>";
            	                        list+='<h2>'+tuilist[i].title+'</h2>';
            	                        list+='<img class="bigimg" src="'+tuilist[i].imgUrl+'">';
            	                        list+='<div class="iconline">';
            	                            list+='<div style="width:41%;"><span class="icona"></span>'+tuilist[i].labelName+'</div>';
                                            list+='<div style="width:29%;text-align:left;"><span class="iconb"></span><span class="numcheck">'+tuilist[i].clickRate+'</span></div>';
            	                            list+='<div>'+tuilist[i].modify+'</div>';
            	                        list+='</div>';    
            	                    list+='</div>';
                                    list+="</a>";
            	                    list+='</li>';
            	                }else if(tuilist[i].styleName=="K"){
            	                	tuilist[i].img=tuilist[i].imgUrl.split(",");
            	                    list+="<div class='first-div "+(i==tuilist.length-1?'active':'as')+"'>";
            	                        list+='<h2>'+tuilist[i].title+'</h2>';
            		                    list+='<div class="iconline">';
            		                           list+='<img src="'+tuilist[i].img[0]+'" class="threeimg">';
            		                           list+='<img src="'+tuilist[i].img[1]+'" class="threeimg">';
            		                           list+='<img src="'+tuilist[i].img[2]+'" class="threeimg">';   
            		                    list+='</div>';
            	                        list+='<div class="iconline">';
            	                           list+='<div style="width:38%;"><span class="icona"></span>'+tuilist[i].labelName+'</div>';
                                           list+='<div style="width:29%;text-align:left;"><span class="iconb"></span><span class="numcheck">'+tuilist[i].clickRate+'</span></div>';
            	                           list+='<div>'+tuilist[i].modify+'</div>';
            	                        list+='</div>';    
            	                    list+='</div>';
                                    list+="</a>";
            		                list+='</li>';
            	                }
            	                if(i==tuilist.length-1){
            	                	$("#UlList").html("").append(list);
            	                }
            	            }
                        }
                    }
    	        }
    	     }); 
    	    $(document).on("click","li a",function(e){
                e.preventDefault();
    	    	var id=$(this).attr("id");
    	    	var contenturl=$(this).attr("contenturl");
    	    	//var typename=$(this).attr("typename");
    	    	var title=$(this).attr("sharetitle");
    	    	var imgurl=$(this).attr("imgurl");
                $.ajax({             
                    type: 'post',
                    cache: false,
                    data:{
                        id:id
                    },
                    url:'/api/group/app/info/addClick.do',
                    success: function(data){
                    	if(data.code==0){
                            if(getQueryString("isDown")){
                                window.location.href=encodeURI(document.location.protocol+'//'+window.location.host+"/web/zixunin/dist/index.html?url="+contenturl+"&id="+id+"&isDown=1")
                            }else{
                                jiexin.openWindow({
                                    url:encodeURI(document.location.protocol+'//'+window.location.host+"/web/zixunin/dist/index.html?url="+contenturl+"&id="+id),
                                    viewid:'sharehtml',
                                    title:"资讯详情",
                                    sharetitle:title,
                                    shareimage:imgurl.split(",")[0]
                                })
                            }
                    	}
    	    	    }
    	    	});
    	    })
    }    
    //微信二次分享
    var share=function(sharedata){
           if(window.location.host=="info.51icare.cn" && window.location.href.indexOf("isDown")>-1){
                $.ajax({  
                    type : "GET",
                    url : 'https://jxo2o.51icare.cn/securityWeb/commonHtm/getShareParams.do?url='+encodeURIComponent(window.location.href.split('#')[0]),
                   /* url:'https://jxo2o.51icare.cn/securityWeb/commonHtm/getShareParams.do?url='+encodeURIComponent('https://info.51icare.cn/web/zixunin/dist/index.html?url=https://qiniujiexino2opublic.51icare.cn/1506667467856marktime%E7%A7%9F%E6%88%B7%E8%BF%9D%E8%A7%84%E4%BD%BF%E7%94%A8%E6%98%8E%E7%81%AB%20%20%20%E5%AE%81%E6%B3%A2%E6%B6%88%E9%98%B2%E6%92%A4%E9%99%A4%E7%99%BE%E4%BD%99%E4%B8%AA%E7%85%A4%E6%B0%94%E7%BD%90%20.html&id=483&isDown=1&from=singlemessage'),*/
                    success : function(data){
                        if(data.code==0){
                            sharejd(data,sharedata);
                        }
                    }
                });
            };
        } 
    var sharejd=function(signdata,sharedata){
        console.log(window.location.href.split('#')[0]);
        console.log(sharedata.imgUrl.split(",")[0])
            wx.config({
                debug:false,
                appId:signdata.appId,
                timestamp:signdata.timestamp,
                nonceStr:signdata.nonceStr,
                signature:signdata.signature,
                jsApiList:[
                    'onMenuShareTimeline',
                    'onMenuShareAppMessage',
                    'onMenuShareQQ',
                    'onMenuShareWeibo',
                    'onMenuShareQZone'
                ]
            });
            wx.ready(function(){
                var shareData = {
                    title:sharedata.title,
                    desc:"掌握安全头条，揭露最新骗局，提供安全知识，关注安全就用臻e盾APP",
                    link:window.location.href.split('#')[0],
                    imgUrl:sharedata.imgUrl.split(",")[0]
                };
                //分享给朋友
                wx.onMenuShareAppMessage(shareData);
                //分享到朋友圈
                wx.onMenuShareTimeline(shareData);
                //分享到QQ
                wx.onMenuShareQQ(shareData);
                //分享到微博
                wx.onMenuShareWeibo(shareData);
                //分享到QZone
                wx.onMenuShareQZone(shareData);
            });
        } 
	var init = (function(){
		getBody()
		isShowDown()
	})()
</script>
</html>